package com.health.system.javacommon.util;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

import com.health.system.javacommon.base.BaseEntity;



/**
 * Title: SysParam 数据类 
 * Description: DAO层映射到数据类,页面封装数据映射到数据类 
 * Copyright: Copyright (c) 2011-03 
 * Company: 湖南京泰
 * 
 * @author you name 
 * @version 1.0 
*/



public class SysParam extends BaseEntity {
	
	//date formats
	
	//columns START
	/**部署参数序列*/
	private java.lang.String id;
	/**参数名称*/
	private java.lang.String paramName;
	/**参数值*/
	private java.lang.String paramValue;
	/**主健值*/
	private java.lang.String mainKey;
	/**备用健值*/
	private java.lang.String backupKey;
	/**备注*/
	private java.lang.String paramRemark;
	/**是否有效:1有效，0无效*/
	private java.lang.String effective;
	
	private java.util.ArrayList idList;
	//columns END

	public SysParam(){
	}

	public SysParam(
		java.lang.String id
	){
		this.id = id;
	}

	public void setId(java.lang.String value) {
		this.id = value;
	}
	
	public java.lang.String getId() {
		return this.id;
	}
	public void setParamName(java.lang.String value) {
		this.paramName = value;
	}
	
	public java.lang.String getParamName() {
		return this.paramName;
	}
	public void setParamValue(java.lang.String value) {
		this.paramValue = value;
	}
	
	public java.lang.String getParamValue() {
		return this.paramValue;
	}
	public void setMainKey(java.lang.String value) {
		this.mainKey = value;
	}
	
	public java.lang.String getMainKey() {
		return this.mainKey;
	}
	public void setBackupKey(java.lang.String value) {
		this.backupKey = value;
	}
	
	public java.lang.String getBackupKey() {
		return this.backupKey;
	}
	public void setParamRemark(java.lang.String value) {
		this.paramRemark = value;
	}
	
	public java.lang.String getParamRemark() {
		return this.paramRemark;
	}
	public void setEffective(java.lang.String value) {
		this.effective = value;
	}
	
	public java.lang.String getEffective() {
		return this.effective;
	}

    public java.util.ArrayList getIdList() {
	    return idList;
    }

    public void setIdList(java.util.ArrayList idList) {
    	this.idList = idList;
    }

    /**手动增加属性后,toString,hashCode,equals都要修改*/
	public String toString() {
		return new ToStringBuilder(this)
			.append("Id",getId())
			.append("ParamName",getParamName())
			.append("ParamValue",getParamValue())
			.append("MainKey",getMainKey())
			.append("BackupKey",getBackupKey())
			.append("ParamRemark",getParamRemark())
			.append("Effective",getEffective())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.append(getParamName())
			.append(getParamValue())
			.append(getMainKey())
			.append(getBackupKey())
			.append(getParamRemark())
			.append(getEffective())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof SysParam == false) return false;
		if(this == obj) return true;
		SysParam other = (SysParam)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.append(getParamName(),other.getParamName())
			.append(getParamValue(),other.getParamValue())
			.append(getMainKey(),other.getMainKey())
			.append(getBackupKey(),other.getBackupKey())
			.append(getParamRemark(),other.getParamRemark())
			.append(getEffective(),other.getEffective())
			.isEquals();
	}
}

